import { Injectable } from '@nestjs/common';
import {InjectRepository} from "@nestjs/typeorm";
import {UserEntity} from "./user.entity";
import {Repository} from "typeorm";

@Injectable()
export class UserService {
    constructor(
        @InjectRepository(UserEntity)
        private usersRepository: Repository<UserEntity>,
    ) {}
    getUsers() {
        const res = this.usersRepository.find()
        console.log("res",res)
        return {code: 200, message: '请求陈工', data: []}
    }

    saveUser(user: any) {
        console.log('user',user)
        return {code:0 ,message:'保存成功'}
    }
}
